package com.jumei.flume.sink.kudu;

import java.util.List;
import java.util.Map;

/**
 * Created by ZhongGang
 * at 2017/7/5 15:59
 */
public interface KuduJdbcDao {
    int BATCH_FLUSH_SIZE = 500;

    int upsert(String table, List<Map<String, Object>> records) throws Exception;

    boolean upsert(String table, Map<String, Object> record) throws Exception;

    <T> int upsert(List<T> records) throws Exception;

    <T> boolean upsert(T record) throws Exception;

    <T> int delete(List<T> records) throws Exception;

    <T> boolean delete(T record) throws Exception;

    int delete(String table, List<Map<String, Object>> records) throws Exception;

    int delete(String table, Map<String, Object> record) throws Exception;
}
